<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="img/asset-favicon.ico">
    <title>社交-问答详情</title>

    <!-- 页面 css js -->
    <!-- <script type="text/javascript" src="../../plugins/sui/sui.min.js"></script> -->

    <link rel="stylesheet" type="text/css" href="plugins/normalize-css/normalize.css" />
    <link rel="stylesheet" type="text/css" href="plugins/yui/cssgrids-min.css" />
    <link rel="stylesheet" type="text/css" href="plugins/sui/sui.min.css" />
    <link rel="stylesheet" type="text/css" href="plugins/sui/sui-append.min.css" />
    <link rel="stylesheet" type="text/css" href="plugins/font-awesome/css/font-awesome.min.css" />
    <link rel="stylesheet" type="text/css" href="css/widget-base.css" />
    <link rel="stylesheet" type="text/css" href="css/widget-head-foot.css" />
    <link rel="stylesheet" type="text/css" href="css/page-sj-qa-detail.css" />
</head>

<body>
<div id="app">
    <div class="wrapper">
        <!--引用组件-->
        <!--头部导航-->
<header id="app" >
  <div  class="sui-navbar">
    <div class="navbar-inner">
      <a href="index-logined.html" class="sui-brand"><img src="img/asset-logo-black.png" alt="社交"/></a>
      <ul class="sui-nav">
        <li class="active"><a href="headline-logined.html">头条</a></li>
        <li><a href="./qa-logined.html" >问答</a></li>
        <li><a href="./activity-index.html" >活动</a></li>
        <li><a href="./makeFriends-index.html" >交友</a></li>
        <li><a href="./spit-index.html" >吐槽</a></li>
        <li><a href="recruit-index.html"  >招聘</a></li>
      </ul>
      <form class="sui-form sui-form pull-left">
        <input type="text" placeholder="输入关键词...">
        <span class="btn-search fa fa-search"></span>
      </form>
        <div class="sui-nav pull-right info" v-if="user_id">
       <li><a href="#1" target="_blank" class="notice">{{ username }}</a></li>
            <li><a href="person-homepage.html" target="_blank" class="homego"><img v-bind:src="avatar" alt="用户头像" /></a></li>
            <li><a href="" target="_blank" class="notice" @click="logout">退出</a></li>
      </div>
      <div class="sui-nav pull-right info" v-else>
       <li><a :href="'login.html'" target="_blank">注册</a></li>
       <li><a :href="'login.html'" target="_blank" class="sui-btn btn-login">登录</a></li>
      </div>
  </div>
  </div>

</header>


    </div>
<div class="tab-nav ">
   <div class="wrapper" >
    <ul class="fl sui-nav nav-tabs navbar-dark" >
        <li @click="on_label('0')" :class="cat=='0'?'active':''"><a :href="'/qa-login.html'" data-toggle="tab">首页</a></li>

        <li v-for="value in labels" @click="on_label(value.id)" :class="cat==value.id?'active':''"><a :href="'/qa-login.html'">{{ value.name }}</a></li>
    </ul>
    <span class="fr more"><a href="#" target="_blank">更多</a></span>
    <div class="clearfix"></div>
   </div>
  </div>
    <!--两列布局-->
    <div class="wrapper qa-content">

<div class="qa-title">
    <div class="fl title">
       <h2>{{ question.title }}</h2>

        <ul>
            <li v-for="a in question.troubleslabel_set" class="tag" >{{ a.navigation_label.name }}</li>
        </ul>

       <p>

           <span class="author">{{ question.user.username }}</span>
           <span>{{ question.create_time | str2date | date2ymd}}{{ question.create_time | str2date | date2hms}}-发布 · {{ question.new_answer_time | str2date | date2ymd}}{{ question.new_answer_time | str2date | date2hms}}-更新</span>
       </p>
    </div>
    <div class="fr share">
        <h4>分享到：</h4>
        <ul class="share-go">
            <li><img src="img/widget-weibo.png" alt=""></li>
            <li><img src="img/widget-weixin.png" alt=""></li>
            <li><img src="img/widget-weibo.png" alt=""></li>
            <li><img src="img/widget-weixin.png" alt=""></li>
        </ul>

    </div>
    <div class="clearfix"></div>
</div>
        <div class="fl left-list">
            <div class="problem-detail">
    <div class="title-intro">
        <div class="sidebar">

            <button type="button" v-show="like_state!=1" @click="on_like_question(1)" class="like" data-placement="right" data-toggle="tooltip" title="问题对人有帮助，内容完整，我也想知道答案"><i class="fa fa-caret-up" aria-hidden="true"></i></button>
            <span class="count">{{ question.like_count }}</span>
            <button type="button" v-show="like_state!=2" @click="on_like_question(2)" class="hate" data-placement="right" data-toggle="tooltip" title="问题没有实际价值，缺少关键内容，没有改进余地"><i class="fa fa-caret-down" aria-hidden="true"></i></button>

             <button type="button" v-show="user_id" @click='on_cancel_like'>取消顶踩</button>
        </div>

        <div class="title">
            <div class="detail">
                <p>{{ question.content }}
                </p>

            </div>
            <div class="clearfix"></div>
            <div class="operate">
                <span class="time">{{ question.create_time | str2date | date2ymd}}{{ question.create_time | str2date | date2hms}}-发布</span>

            </div>

        </div>

    </div>


        <div class="edit-answer">
        <h4>撰写答案</h4>
        <div class="edit-tip">
            <form class="comment-form" autocomplete="off" @submit.prevent="onSubmit">
                    <textarea rows="10" cols="103" v-model="answers_content" placeholder="请撰写你的答案"></textarea>
                    <button type="submit" @click="on_answer()" class="sui-btn submit-comment">提交答案</button>
            </form>

        </div>
    </div>
    <div class="answer-intro">
        <h4 class="answer-num">{{ question.answer_count }}个回答</h4>
        <ul>
            <li v-for="answer in answers">


                <div class="title">
                    <p>{{ answer.content }}</p>
                    <div class="operate">
                        <div class="tool pull-left">
                            <span class="time">{{ question.create_time | str2date | date2ymd}}{{ question.create_time | str2date | date2hms}}-发布</span>
                            <button class="comment" @click="on_comment(answer.id)">评论</button>


                                <form v-show="answer_id==answer.id" class="comment-form" autocomplete="off" @submit.prevent="onSubmit">
                                    <textarea rows="10" cols="80" v-model="comment_content" placeholder="使用评论询问更多信息或提出修改意见，请不要在评论里回答问题"></textarea>
                                    <button type="submit" @click="add_comment" class="sui-btn submit-comment">提交评论</button>
                                </form>
                        </div>

                        <div class="myanswer pull-right">
                            <div v-if="user_id==answer.user.id">
                                <img v-bind:src="avatar" alt="用户头像" /><a href="#">我的回答</a>
                            </div>
                             <div v-else>
                                <img v-bind:src="answer.user.avatar" alt="用户头像" /><a href="#">{{ answer.user.username }}</a>
                            </div>
                    <div class="clearfix"></div>
                </div>
                    </div>

                <ul>
                    <li v-for="comment in answer.respondcomment_set" style="list-style:none">
                 <div class="title">
                    <p>{{ comment.content }}</p>
                    <div class="operate">
                         <div class="tool pull-left">
                            <span class="time">{{ comment.create_time | str2date | date2ymd}}{{ comment.create_time | str2date | date2hms}}-发布</span>
                         </div>
                        <div class="myanswer pull-right">
                            <div v-if="user_id==comment.user.id">
                                <img v-bind:src="avatar" alt="用户头像" /><a href="#">我的回答</a>
                            </div>
                             <div v-else>
                                <img v-bind:src="comment.user.avatar" alt="用户头像" /><a href="#">{{ comment.user.username }}</a>
                            </div>
                    <div class="clearfix"></div>
                </div>
                    </div>
                </div>
                    </li>
                    </ul>
                      </div>

            </li>>
        </ul>

    </div>

</div>
<!-- <script>
    $(function () {
        $(".comment").click(function () {
            $(this).parents(".operate").siblings(".comment-box").toggle();
        });
        $(".sidebar .fa").hover(function () {
            $(this).css("color", "#e64620");
        }, function () {
            $(this).css("color", "#000");
        })
    })

</script> -->
        </div>
        <div class="fl right-tag">
            <div class="similar-problem">
    <h3 class="title">相似问题</h3>
    <ul class="problem-list">
        <li class="list-item">
            <p class="list-title">求一份浏览器中html css javascript jquery ajax的渲染顺序与原理！！</p>
            <p class="list-info"><a href="">1 回答</a> | 已解决</p>
        </li>
        <li class="list-item">
            <p class="list-title">求一份浏览器中html css javascript jquery ajax的渲染顺序与原理！！</p>
            <p class="list-info"><a href="">1 回答</a> | 已解决</p>
        </li>
         <li class="list-item">
            <p class="list-title">求一份浏览器中html css javascript jquery ajax的渲染顺序与原理！！</p>
            <p class="list-info"><a href="">1 回答</a> | 已解决</p>
        </li>
         <li class="list-item">
            <p class="list-title">求一份浏览器中html css javascript jquery ajax的渲染顺序与原理！！</p>
            <p class="list-info"><a href="">1 回答</a> | 已解决</p>
        </li>
    </ul>
</div>
        </div>
        <div class="clearfix"></div>
    </div>
    </div>

    <div class="footer">
        <div class="wrapper">
            <div class="footer-bottom">
    <div class="link">
        <dl>
            <dt>网站相关</dt>
            <dd>关于我们</dd>
            <dd>服务条款</dd>
            <dd>帮助中心</dd>
            <dd>编辑器语法</dd>
        </dl>
        <dl>
            <dt>常用链接</dt>
            <dd>传智播客</dd>
            <dd>传智论坛</dd>
        </dl>
        <dl>
            <dt>联系我们</dt>
            <dd>联系我们</dd>
            <dd>加入我们</dd>
            <dd>建议反馈</dd>
        </dl>
        <dl>
            <dt>关注我们</dt>
            <dd>微博</dd>
            <dd>twitter</dd>
        </dl>

        <div class="xuke">
            <h3>内容许可</h3>
            <p>除特别说明外，用户内容均采用知识共享署名-非商业性使用-禁止演绎4.0 国际许可协议 (CC BY-NC-ND 4.0) 进行许可</p>
            <p>本站由 传智研究院 提供更新服务</p>
        </div>
    </div>


    <p class="Copyright">Copyright © 2017 传智问答社区 当前版本 0.0.1</p>
</div>
        </div>

    </div>





<script>
// $(function(){
//   $(".hover").hover(function(){
//     $(".hoverinfo").stop().animate({
//        opacity: "show"
//     },"slow");
//     $(this).find(".fa-plus").css("color","#e64620");
//   },function(){
//     $(".hoverinfo").stop().animate({
//        opacity: "hide"
//     },"slow");
//     $(this).find(".fa-plus").css("color","#000");
//   })
// })
</script>
 <script type="text/javascript" src="js/vue-2.5.16.js"></script>
  <script type="text/javascript" src="js/axios-0.18.0.min.js"></script>
  <script type="text/javascript" src="js/qa-detail.js"></script>
</body>